package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.ReservationDiningStatus;
import com.shioirikukuri.mapper.ReservationDiningStatusMapper;
import com.shioirikukuri.service.IReservationDiningStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReservationDiningStatusServiceImpl implements IReservationDiningStatusService {
	@Autowired
	private ReservationDiningStatusMapper mapper;

	@Override
	public ReservationDiningStatus getReservationDiningStatusById(Integer id) {
		return mapper.selectReservationDiningStatusById(id);
	}

	@Override
	public List<ReservationDiningStatus> getAllReservationDiningStatuses() {
		return mapper.selectAllReservationDiningStatuses();
	}

	@Override
	public List<ReservationDiningStatus> getReservationDiningStatusesByDiningOrderId(Integer diningOrderId) {
		return mapper.selectByDiningOrderId(diningOrderId);
	}

	@Override
	public List<ReservationDiningStatus> getReservationDiningStatusesByReservationOrderId(Integer reservationOrderId) {
		return mapper.selectByReservationOrderId(reservationOrderId);
	}

	@Override
	public void createReservationDiningStatus(ReservationDiningStatus status) {
		mapper.insertReservationDiningStatus(status);
	}

	@Override
	public void updateReservationDiningStatus(ReservationDiningStatus status) {
		mapper.updateReservationDiningStatus(status);
	}

	@Override
	public void deleteReservationDiningStatusById(Integer id) {
		mapper.deleteReservationDiningStatusById(id);
	}
}


